cmake_minimum_required(VERSION 3.10)
project(buffalo)

SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_BUILD_TYPE Release)

# set include and lib dirs
IF (WIN32)
    # setup for windows
    add_definitions("-DUNICODE" "-D_UNICODE")
    add_definitions("-D_CRT_SECURE_NO_WARNINGS")
ENDIF (WIN32)

# MS DirectXTK
SET(DXTK_INCLUDE_DIR "D:/Libs/DirectXTK/Include")
SET(DXTK_LIBRARY "D:/Libs/DirectXTK/Lib/Debug/DirectXTK.lib")

SET(BUFFALO_BASE_DIR "${PROJECT_SOURCE_DIR}/src/")

FILE(GLOB_RECURSE SOURCE_FILES "${PROJECT_SOURCE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HEADER_FILES "${PROJECT_SOURCE_DIR}/src/*.h")

ADD_EXECUTABLE(
    buffalo-core WIN32
    ${SOURCE_FILES}
    ${HEADER_FILES}
)

TARGET_INCLUDE_DIRECTORIES(
    buffalo-core PRIVATE
    ${BUFFALO_BASE_DIR}
    ${DXTK_INCLUDE_DIR}
)

TARGET_LINK_LIBRARIES(
    buffalo-core
    d3d11.lib
    d3dcompiler.lib
    DXGI.lib
    ${DXTK_LIBRARY}
)